import 'package:flutter/material.dart';
import 'package:lai_zhan/common/style/AppStyle.dart';

//用户信息项
class UserInfoItem extends StatefulWidget {
  String name;
  String content;
  VoidCallback onClick;

  UserInfoItem({this.name, this.content, this.onClick});

  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return new _UserInfoItemState();
  }
}

class _UserInfoItemState extends State<UserInfoItem> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new FlatButton(
      child: new Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          new Text(
            widget.name,
            style: AppConstant.smallText,
          ),
          new Text(
            widget.content,
            style: AppConstant.smallText,
          ),
        ],
      ),
      onPressed: widget.onClick,
    );
  }
}
